php forum
php mysql forum
php mysql smarty
 
Topic Options
#276969 - 07/20/04 11:55 AM Beta-[6.4-6.5] Login Redirection
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Mod Name / Version: Login Redirection <br /> <br />Description: After the user has logged in they will be redirected to the page they were on when they clicked the login link. <br /> <br />Working Under: UBB.Threads 6.4-6.5 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: <br /> <br />Author(s): Gardener <br /> <br />Date: 07/20/04 <br /> <br />Credits: <br /> <br />Files Altered: templates/default/ubbt_unregisterednav.tmpl templates/default/login.tmpl ubbt.inc.php <br /> <br />New Files: <br /> <br />Database Altered: None <br /> <br />Info/Instructions: <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
117006-ubbt_login_redirection-1_0.txt (107 downloads)



Edited by Gardener (07/21/04 05:03 AM)

Top
#276970 - 07/20/04 06:07 PM Re: Beta-[6.4] Login Redirection [Re: c0bra]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
Thanx Gard
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#276971 - 07/20/04 06:11 PM Re: Beta-[6.4] Login Redirection [Re: 234234]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
No problem. I'm so used to this now from Mambo that I get very annoyed on sites where it doesn't work so I thought I might as well create a mod for it.<br /><br />I was thinking of having the login page getting the referer so that it would work regardless of how you got to the login page, but since some Personal Firewalls strip this I thought it was better to just use the login link in the navigation bar instead. If you have login links in other places you could add the same thing as in the ubbt_unregisterednav.tmpl file to make it work there as well.
_________________________
/Gardener | Complete list of my mods

Top
#276972 - 07/20/04 06:11 PM Re: Beta-[6.4] Login Redirection [Re: 234234]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Cool, that one was on my list for a long time. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br />Just as a note. REQUEST_URI doesn't work on all php configurations. It shouldn't work if you use FASTCGI for example.<br />But you can use something similar, for example:<br />$return = "http://" .$_ENV['SERVER_NAME'] . $_ENV['PATH_INFO'];
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#276973 - 07/20/04 06:22 PM Re: Beta-[6.4] Login Redirection [Re: -Fusion-]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Thanks for the heads up! I'll leave it as an exercise to whoever needs it how to change this in the mod though. =]
_________________________
/Gardener | Complete list of my mods

Top
#276974 - 07/20/04 11:40 PM Re: Beta-[6.4] Login Redirection [Re: c0bra]
TonyN Offline
Journeyman

Registered: 06/13/03
Posts: 132
Loc: Berkeley out of this world
I'm sure someone has asked this somewhere already, but why isn't this available in the standard threads, at least as an administrative option? and maybe as something a user can set back to the present state of affairs if desired! Tony

Top
#276975 - 07/21/04 01:12 AM Re: Beta-[6.4] Login Redirection [Re: BOOO_YAAA]
oceanwest Offline
Enthusiast

Registered: 04/25/02
Posts: 490
Loc: Escondido, CA
This is Awesome... It works for 6.5<br /><br />But how do I get it to work when I have IIP and Sidebar with the loginpal?
_________________________
FM Forums
Largest Online FileMaker Community
http://www.fmforums.com

Top
#276976 - 07/21/04 05:01 AM Re: Beta-[6.4] Login Redirection [Re: sdf123]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Thanks, I'll add that to the list of versions it works for.<br /><br />You can add the following to the login form in the loginpal:<br /><br />
Code:
<br />$return = urlencode( find_environmental( "REQUEST_URI" ) );<br />print "&lt;input type='hidden' name='return' value='$return' /&gt;";<br />
_________________________
/Gardener | Complete list of my mods

Top
#276977 - 07/21/04 10:29 AM Re: Beta-[6.4] Login Redirection [Re: c0bra]
oceanwest Offline
Enthusiast

Registered: 04/25/02
Posts: 490
Loc: Escondido, CA
Thanks' G
_________________________
FM Forums
Largest Online FileMaker Community
http://www.fmforums.com

Top
#276978 - 08/11/04 02:22 PM Re: Beta-[6.4] Login Redirection [Re: c0bra]
Varys Offline
Newbie

Registered: 02/13/04
Posts: 14
Where exactly in the loginpal do you place this?
_________________________
Varys the Spider
The Great Library - A Shadowbane Fansite
Gird thyself with the weapons of knowledge and the armor of wisdom.
Victory is won through strength of mind and will as through brawn and steel.

Top
#276979 - 08/12/04 06:41 AM Re: Beta-[6.4] Login Redirection [Re: Phil_dup1]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
It depends on which version of IIP you are running... But it's where the rest of the form is printed... In my (old) version there's a line that looks like this:<br /><br /> echo "<tr><td class=\"lighttable\"><input type=\"submit\" name=\"submit\" value=\"{$pal_LoginStatus[5]}\" class=\"buttons\" onclick=\"return checkLogin()\" /><input type=\"hidden\" name=\"firstlogin\" value=\"1\" /><input type=\"hidden\" name=\"Cat\" value=\"$Cat\" /><input type=\"hidden\" name=\"buttlogin\" value=\"$ubbt_lang[BUTT_LOGIN]\" /><br /><input type=\"checkbox\" name=\"buttforgot\" value=\"{$pal_LoginStatus[11]}\" /> {$pal_LoginStatus[11]}$palRemember</td></tr></table></form>{$wrapper[$wrapnum]['table_footer']}";<br /><br /><br />It should look like this:<br /> $returnpage = urlencode( find_environmental( "REQUEST_URI" ) );<br /> echo "<tr><td class=\"lighttable\"><input type=\"submit\" name=\"submit\" value=\"{$pal_LoginStatus[5]}\" class=\"buttons\" onclick=\"return checkLogin()\" /><input type=\"hidden\" name=\"firstlogin\" value=\"1\" /><input type=\"hidden\" name=\"Cat\" value=\"$Cat\" /><input type=\"hidden\" name=\"buttlogin\" value=\"$ubbt_lang[BUTT_LOGIN]\" /><br /><input type=\"checkbox\" name=\"buttforgot\" value=\"{$pal_LoginStatus[11]}\" /><input type=\"hidden\" name=\"returnpage\" value=\"$returnpage\" /> {$pal_LoginStatus[11]}$palRemember</td></tr></table></form>{$wrapper[$wrapnum]['table_footer']}";<br /><br /><br />Notice the extra line above as well.
_________________________
/Gardener | Complete list of my mods

Top
#276980 - 08/16/04 08:34 AM Re: Beta-[6.4-6.5] Login Redirection [Re: c0bra]
gregt Offline
Lurker

Registered: 03/24/03
Posts: 2
Is it possible to have a autlogin, users that are subscribed, in the subscriptions mail that would take you to the actual post. I have a lot of users that have bad password memories, autologin from the board is no good as they move around on different PC's. Big Thanks

Top
#276981 - 08/16/04 09:38 AM Re: Beta-[6.4-6.5] Login Redirection [Re: K0ncepthwl]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Shouldn't be too hard to change the link in the email to go to the login page instead with the real link as the return page. But that would make the link in the mail very long. Maybe it would be better to just have some indication that the user should be returned to a specified post instead. That shouldn't be very hard either, but would require some extra coding in the login page as well.
_________________________
/Gardener | Complete list of my mods

Top



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks